/**
 * 
 */
package com.grp6.game.view;


import com.grp6.game.ui.platform.IDialog;
import com.grp6.game.ui.platform.IQuestionValidator;

/**
 * Contains methods to create and display content on the Dialog
 * @author Group6
 */
public abstract class AbstractDialogView implements IView, IQuestionValidator{
	private IDialog dialog;
	
	/**
	 * Constructor that takes a Dialog object
	 * @param dialog
	 */
	protected AbstractDialogView(IDialog dialog){
		this.dialog = dialog;
	}
	
	/**
	 * Adds a question to the dialog
	 * @param question
	 */
	public final void addQuestion(String question){
		dialog.addQuestions(question, this);
	}
	
	/**
	 * Displays the contents on the dialog
	 */
	public final void display(){
		dialog.display();
	}
	
}
